Skip to content

[2.0.x] Max7219 cleanup, simplify, and extend#11575

Merged
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_misc_fixes_aug_6
Aug 18, 2018
Merged

[2.0.x] Max7219 cleanup, simplify, and extend#11575
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_misc_fixes_aug_6

Conversation

@thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Aug 17, 2018

Cleanups to Max7219 in the course of testing and debugging. No changes in core behavior.

  • Repair and simplify utility macros and relocate to the .cpp file.
  • Add M7219 D V command to set a native row in the matrix directly to a byte value.
  • Refactor as a singleton class called Max7219.

@thinkyhead thinkyhead force-pushed the bf2_misc_fixes_aug_6 branch from fbf627f to 5d51851 Compare August 17, 2018 11:35
@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2018

Refactor as a singleton class called Max7219.

Probably this is OK. But doing this means we can only have one chain in the system. We can't have two chains.

@thinkyhead
Copy link
Member Author

That's no different than how it already was, and I think that's fine. We only support one instance of most peripherals.

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 18, 2018

Yes. Agreed! How about we Squash and merge.

@thinkyhead thinkyhead merged commit 56f1e17 into MarlinFirmware:bugfix-2.0.x Aug 18, 2018
@thinkyhead thinkyhead deleted the bf2_misc_fixes_aug_6 branch August 18, 2018 06:33
@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 18, 2018

@thinkyhead This message is duplicated just to make sure you see it...

At a -90 degree orientation with 2 units... X=8 & Y=16 The column command works OK. I can do a M7219 C2 V???? and get the right 16 bit pattern drawn on the display. However, the row command is broke. A M7219 R2 V?? of any 8 bit value fails to work. But the init_pattern=2 spiral pattern does look correct.

At a 0 degree orientation with 2 units... X=16 & Y=8 The init pattern also seems to work correctly.
And... It appears both the M7219 R ?? V???? and M7219 C ?? V???? work correctly.

At a 90 degree orientation with 2 units... X=8 & Y=16 Init spiral is wrong! M7219 R?? V?? is totally scrambled. M7219 C?? V?? is backwards. The LED's are sort of correct, but they are a mirror image.

At 180 degree orientation with 2 units... X=16 & Y=8. Init pattern is sort of correct. But the two halves need to be exchanged for it to be correct. The LED's are in reverse order for M7219 C2 V254. M7219 C8 V255 puts the line on the wrong 8x8 matrix.

How about we revert everything and just do one change at a time. Otherwise this is going to be too complicated to figure out??? If we make one change at a time... We will know when we go from a working state to a broken state. Perhaps the first thing to do is converting to a singleton with no logic changes???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants